<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>NEWS-3.2.0 - RDoc Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="file">
  <!-- this is page.html -->
  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0-preview2 NOT FOUND -->
  </div> <!-- end action bar -->


 <div class='wrapper hdiv'>

 


<nav id='vapp' role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
<div class="nav-section">
  <h3>Table of Contents</h3>

  <ul class="link-list" role="directory">
    <li><a href="#label-NEWS+for+Ruby+3.2.0">NEWS for Ruby 3.2.0</a>
    <li><a href="#label-Language+changes">Language changes</a>
    <li><a href="#label-Core+classes+updates">Core classes updates</a>
    <li><a href="#label-Stdlib+updates">Stdlib updates</a>
    <li><a href="#label-Supported+platforms">Supported platforms</a>
    <li><a href="#label-Compatibility+issues">Compatibility issues</a>
    <li><a href="#label-Removed+constants">Removed constants</a>
    <li><a href="#label-Removed+methods">Removed methods</a>
    <li><a href="#label-Source+code+incompatibility+of+extension+libraries">Source code incompatibility of extension libraries</a>
    <li><a href="#label-Error+printer">Error printer</a>
    <li><a href="#label-Constant+lookup+when+defining+a+class-2Fmodule">Constant lookup when defining a class/module</a>
    <li><a href="#label-Stdlib+compatibility+issues">Stdlib compatibility issues</a>
    <li><a href="#label-C+API+updates">C API updates</a>
    <li><a href="#label-Updated+C+APIs">Updated C APIs</a>
    <li><a href="#label-Added+C+APIs">Added C APIs</a>
    <li><a href="#label-Removed+C+APIs">Removed C APIs</a>
    <li><a href="#label-Implementation+improvements">Implementation improvements</a>
    <li><a href="#label-JIT">JIT</a>
    <li><a href="#label-YJIT">YJIT</a>
    <li><a href="#label-MJIT">MJIT</a>
  </ul>
</div>

  <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>

  <div id="project-metadata">
   <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
    
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
    <li><a href="../NEWS/NEWS-1_8_7.html">NEWS-1.8.7</a>
    <li><a href="../NEWS/NEWS-1_9_1.html">NEWS-1.9.1</a>
    <li><a href="../NEWS/NEWS-1_9_2.html">NEWS-1.9.2</a>
    <li><a href="../NEWS/NEWS-1_9_3.html">NEWS-1.9.3</a>
    <li><a href="../NEWS/NEWS-2_0_0.html">NEWS-2.0.0</a>
    <li><a href="../NEWS/NEWS-2_1_0.html">NEWS-2.1.0</a>
    <li><a href="../NEWS/NEWS-2_2_0.html">NEWS-2.2.0</a>
    <li><a href="../NEWS/NEWS-2_3_0.html">NEWS-2.3.0</a>
    <li><a href="../NEWS/NEWS-2_4_0.html">NEWS-2.4.0</a>
    <li><a href="../NEWS/NEWS-2_5_0.html">NEWS-2.5.0</a>
    <li><a href="../NEWS/NEWS-2_6_0.html">NEWS-2.6.0</a>
    <li><a href="../NEWS/NEWS-2_7_0.html">NEWS-2.7.0</a>
    <li><a href="../NEWS/NEWS-3_0_0_md.html">NEWS-3.0.0</a>
    <li><a href="../NEWS/NEWS-3_1_0_md.html">NEWS-3.1.0</a>
    <li><a href="../NEWS/NEWS-3_2_0_md.html">NEWS-3.2.0</a>
    <li><a href="../bsearch_rdoc.html">bsearch</a>
    <li><a href="../bug_triaging_rdoc.html">bug_triaging</a>
    <li><a href="../case_mapping_rdoc.html">case_mapping</a>
    <li><a href="../character_selectors_rdoc.html">character_selectors</a>
    <li><a href="../command_injection_rdoc.html">command_injection</a>
    <li><a href="../contributing_md.html">contributing</a>
    <li><a href="../contributing/building_ruby_md.html">building_ruby</a>
    <li><a href="../contributing/documentation_guide_md.html">documentation_guide</a>
    <li><a href="../contributing/glossary_md.html">glossary</a>
    <li><a href="../contributing/making_changes_to_ruby_md.html">making_changes_to_ruby</a>
    <li><a href="../contributing/making_changes_to_stdlibs_md.html">making_changes_to_stdlibs</a>
    <li><a href="../contributing/reporting_issues_md.html">reporting_issues</a>
    <li><a href="../contributing/testing_ruby_md.html">testing_ruby</a>
    <li><a href="../dig_methods_rdoc.html">dig_methods</a>
    <li><a href="../distribution_md.html">distribution</a>
    <li><a href="../dtrace_probes_rdoc.html">dtrace_probes</a>
    <li><a href="../encodings_rdoc.html">encodings</a>
    <li><a href="../extension_ja_rdoc.html">extension.ja</a>
    <li><a href="../extension_rdoc.html">extension</a>
    <li><a href="../fiber_md.html">fiber</a>
    <li><a href="../format_specifications_rdoc.html">format_specifications</a>
    <li><a href="../globals_rdoc.html">globals</a>
    <li><a href="../implicit_conversion_rdoc.html">implicit_conversion</a>
    <li><a href="../keywords_rdoc.html">keywords</a>
    <li><a href="../maintainers_md.html">maintainers</a>
    <li><a href="../marshal_rdoc.html">marshal</a>
    <li><a href="../memory_view_md.html">memory_view</a>
    <li><a href="../optparse/argument_converters_rdoc.html">argument_converters</a>
    <li><a href="../optparse/creates_option_rdoc.html">creates_option</a>
    <li><a href="../optparse/option_params_rdoc.html">option_params</a>
    <li><a href="../optparse/tutorial_rdoc.html">tutorial</a>
    <li><a href="../packed_data_rdoc.html">packed_data</a>
    <li><a href="../ractor_md.html">ractor</a>
    <li><a href="../regexp_rdoc.html">regexp</a>
    <li><a href="../regexp/methods_rdoc.html">methods</a>
    <li><a href="../regexp/unicode_properties_rdoc.html">unicode_properties</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING.html">COPYING</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING_ja.html">COPYING.ja</a>
    <li><a href="../ruby_3_3_0_preview2/LEGAL.html">LEGAL</a>
    <li><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a>
    <li><a href="../ruby_3_3_0_preview2/README_ja_md.html">README.ja</a>
    <li><a href="../ruby_3_3_0_preview2/README_md.html">README</a>
    <li><a href="../security_rdoc.html">security</a>
    <li><a href="../signals_rdoc.html">signals</a>
    <li><a href="../standard_library_rdoc.html">standard_library</a>
    <li><a href="../strftime_formatting_rdoc.html">strftime_formatting</a>
    <li><a href="../syntax_rdoc.html">syntax</a>
    <li><a href="../syntax/assignment_rdoc.html">assignment</a>
    <li><a href="../syntax/calling_methods_rdoc.html">calling_methods</a>
    <li><a href="../syntax/comments_rdoc.html">comments</a>
    <li><a href="../syntax/control_expressions_rdoc.html">control_expressions</a>
    <li><a href="../syntax/exceptions_rdoc.html">exceptions</a>
    <li><a href="../syntax/literals_rdoc.html">literals</a>
    <li><a href="../syntax/methods_rdoc.html">methods</a>
    <li><a href="../syntax/miscellaneous_rdoc.html">miscellaneous</a>
    <li><a href="../syntax/modules_and_classes_rdoc.html">modules_and_classes</a>
    <li><a href="../syntax/pattern_matching_rdoc.html">pattern_matching</a>
    <li><a href="../syntax/precedence_rdoc.html">precedence</a>
    <li><a href="../syntax/refinements_rdoc.html">refinements</a>
    <li><a href="../timezones_rdoc.html">timezones</a>
    <li><a href="../windows_md.html">windows</a>
    <li><a href="../yjit/yjit_md.html">yjit</a>
    <li><a href="../yjit/yjit_hacking_md.html">yjit_hacking</a>
  </ul>
</div>

   </div>
  </div>
</nav>


<!--  carbon ads here -->

<div id='extraz'>
  <div class='adzbox-index'  >
   
  </div>
 </div>         


<main role="main" aria-label="Page NEWS/NEWS-3.2.0.md">

<h1 id="label-NEWS+for+Ruby+3.2.0"><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a> for Ruby 3.2.0<span><a href="#label-NEWS+for+Ruby+3.2.0">&para;</a> <a href="#top">&uarr;</a></span></h1>

<p>This document is a list of user-visible feature changes since the <strong>3.1.0</strong> release, except for bug fixes.</p>

<p>Note that each entry is kept to a minimum, see links for details.</p>

<h2 id="label-Language+changes">Language changes<span><a href="#label-Language+changes">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Anonymous rest and keyword rest arguments can now be passed as  arguments, instead of just used in method parameters.  [<a href="https://bugs.ruby-lang.org/issues/18351">Feature #18351</a>]</p>

<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">foo</span>(<span class="ruby-operator">*</span>)
  <span class="ruby-identifier">bar</span>(<span class="ruby-operator">*</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">baz</span>(<span class="ruby-operator">**</span>)
  <span class="ruby-identifier">quux</span>(<span class="ruby-operator">**</span>)
<span class="ruby-keyword">end</span>
</pre>
</li><li>
<p>A proc that accepts a single positional argument and keywords will  no longer autosplat. [<a href="https://bugs.ruby-lang.org/issues/18633">Bug #18633</a>]</p>

<pre class="ruby"><span class="ruby-identifier">proc</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-operator">**</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>}.<span class="ruby-identifier">call</span>([<span class="ruby-value">1</span>, <span class="ruby-value">2</span>])
<span class="ruby-comment"># Ruby 3.1 and before</span>
<span class="ruby-comment"># =&gt; 1</span>
<span class="ruby-comment"># Ruby 3.2 and after</span>
<span class="ruby-comment"># =&gt; [1, 2]</span>
</pre>
</li><li>
<p>Constant assignment evaluation order for constants set on explicit  objects has been made consistent with single attribute assignment  evaluation order. With this code:</p>

<pre class="ruby"><span class="ruby-identifier">foo</span><span class="ruby-operator">::</span><span class="ruby-constant">BAR</span> = <span class="ruby-identifier">baz</span>
</pre>

<p><code>foo</code> is now called before <code>baz</code>. Similarly, for multiple assignments to constants, left-to-right evaluation order is used. With this code:</p>

<pre class="ruby"><span class="ruby-identifier">foo1</span><span class="ruby-operator">::</span><span class="ruby-constant">BAR1</span>, <span class="ruby-identifier">foo2</span><span class="ruby-operator">::</span><span class="ruby-constant">BAR2</span> = <span class="ruby-identifier">baz1</span>, <span class="ruby-identifier">baz2</span>
</pre>

<p>The following evaluation order is now used:</p>
<ol><li>
<p><code>foo1</code></p>
</li><li>
<p><code>foo2</code></p>
</li><li>
<p><code>baz1</code></p>
</li><li>
<p><code>baz2</code></p>
</li></ol>

<p>[<a href="https://bugs.ruby-lang.org/issues/15928">Bug #15928</a>]</p>
</li><li>
<p>"Find pattern" is no longer experimental.  [<a href="https://bugs.ruby-lang.org/issues/18585">Feature #18585</a>]</p>
</li><li>
<p>Methods taking a rest parameter (like <code>*args</code>) and wishing to delegate keyword  arguments through <code>foo(*args)</code> must now be marked with <code>ruby2_keywords</code>  (if not already the case). In other words, all methods wishing to delegate  keyword arguments through <code>*args</code> must now be marked with <code>ruby2_keywords</code>,  with no exception. This will make it easier to transition to other ways of  delegation once a library can require Ruby 3+. Previously, the <code>ruby2_keywords</code>  flag was kept if the receiving method took <code>*args</code>, but this was a bug and an  inconsistency. A good technique to find the potentially-missing <code>ruby2_keywords</code>  is to run the test suite, for where it fails find the last method which must  receive keyword arguments, use <code>puts nil, caller, nil</code> there, and check each  method/block on the call chain which must delegate keywords is correctly marked  as <code>ruby2_keywords</code>. [<a href="https://bugs.ruby-lang.org/issues/18625">Bug #18625</a>] [<a href="https://bugs.ruby-lang.org/issues/16466">Bug #16466</a>]</p>

<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">target</span>(<span class="ruby-operator">**</span><span class="ruby-identifier">kw</span>)
<span class="ruby-keyword">end</span>

<span class="ruby-comment"># Accidentally worked without ruby2_keywords in Ruby 2.7-3.1, ruby2_keywords</span>
<span class="ruby-comment"># needed in 3.2+. Just like (*args, **kwargs) or (...) would be needed on</span>
<span class="ruby-comment"># both #foo and #bar when migrating away from ruby2_keywords.</span>
<span class="ruby-identifier">ruby2_keywords</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bar</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
  <span class="ruby-identifier">target</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span>

<span class="ruby-identifier">ruby2_keywords</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">foo</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
  <span class="ruby-identifier">bar</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span>

<span class="ruby-identifier">foo</span>(<span class="ruby-value">k:</span> <span class="ruby-value">1</span>)
</pre>
</li></ul>

<h2 id="label-Core+classes+updates">Core classes updates<span><a href="#label-Core+classes+updates">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>Note: We’re only listing outstanding class updates.</p>
<ul><li>
<p><a href="../Fiber.html"><code>Fiber</code></a></p>
<ul><li>
<p>Introduce <a href="../Fiber.html#method-c-5B-5D"><code>Fiber.[]</code></a> and <a href="../Fiber.html#method-c-5B-5D-3D"><code>Fiber.[]=</code></a> for inheritable fiber storage.  Introduce <a href="../Fiber.html#method-i-storage"><code>Fiber#storage</code></a> and <a href="../Fiber.html#method-i-storage-3D"><code>Fiber#storage=</code></a> (experimental) for  getting and resetting the current storage. Introduce  <code>Fiber.new(storage:)</code> for setting the storage when creating a  fiber. [<a href="https://bugs.ruby-lang.org/issues/19078">Feature #19078</a>]</p>

<p>Existing <a href="../Thread.html"><code>Thread</code></a> and <a href="../Fiber.html"><code>Fiber</code></a> local variables can be tricky to use. Thread-local variables are shared between all fibers, making it hard to isolate, while Fiber-local variables can be hard to share. It is often desirable to define unit of execution ("execution context") such that some state is shared between all fibers and threads created in that context. This is what <a href="../Fiber.html"><code>Fiber</code></a> storage provides.</p>

<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">log</span>(<span class="ruby-identifier">message</span>)
  <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{Fiber[:request_id]}: #{message}&quot;</span>
<span class="ruby-keyword">end</span>

<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">handle_requests</span>
  <span class="ruby-keyword">while</span> <span class="ruby-identifier">request</span> = <span class="ruby-identifier">read_request</span>
    <span class="ruby-constant">Fiber</span>.<span class="ruby-identifier">schedule</span> <span class="ruby-keyword">do</span>
      <span class="ruby-constant">Fiber</span>[<span class="ruby-value">:request_id</span>] = <span class="ruby-constant">SecureRandom</span>.<span class="ruby-identifier">uuid</span>

      <span class="ruby-identifier">request</span>.<span class="ruby-identifier">messages</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">message</span><span class="ruby-operator">|</span>
        <span class="ruby-constant">Fiber</span>.<span class="ruby-identifier">schedule</span> <span class="ruby-keyword">do</span>
          <span class="ruby-identifier">log</span>(<span class="ruby-node">&quot;Handling #{message}&quot;</span>) <span class="ruby-comment"># Log includes inherited request_id.</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
</pre>

<p>You should generally consider <a href="../Fiber.html"><code>Fiber</code></a> storage for any state which you want to be shared implicitly between all fibers and threads created in a given context, e.g. a connection pool, a request id, a logger level, environment variables, configuration, etc.</p>
</li></ul>
</li><li>
<p><a href="../Fiber/Scheduler.html"><code>Fiber::Scheduler</code></a></p>
<ul><li>
<p>Introduce <code>Fiber::Scheduler#io_select</code> for non-blocking <a href="../IO.html#method-c-select"><code>IO.select</code></a>.  [<a href="https://bugs.ruby-lang.org/issues/19060">Feature #19060</a>]</p>
</li></ul>
</li><li>
<p><a href="../IO.html"><code>IO</code></a></p>
<ul><li>
<p>Introduce <a href="../IO.html#method-i-timeout-3D"><code>IO#timeout=</code></a> and <a href="../IO.html#method-i-timeout"><code>IO#timeout</code></a> which can cause  <a href="../IO/TimeoutError.html"><code>IO::TimeoutError</code></a> to be raised if a blocking operation exceeds the  specified timeout. [<a href="https://bugs.ruby-lang.org/issues/18630">Feature #18630</a>]</p>

<pre class="ruby"><span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">timeout</span> = <span class="ruby-value">1</span>
<span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">read</span> <span class="ruby-comment"># =&gt; Blocking operation timed out! (IO::TimeoutError)</span>
</pre>
</li><li>
<p>Introduce <code>IO.new(..., path:)</code> and promote <code>File#path</code> to <code>IO#path</code>.  [<a href="https://bugs.ruby-lang.org/issues/19036">Feature #19036</a>]</p>
</li></ul>
</li><li>
<p><a href="../Class.html"><code>Class</code></a></p>
<ul><li>
<p><a href="../Class.html#method-i-attached_object"><code>Class#attached_object</code></a>, which returns the object for which  the receiver is the singleton class. Raises <a href="../TypeError.html"><code>TypeError</code></a> if the  receiver is not a singleton class.  [<a href="https://bugs.ruby-lang.org/issues/12084">Feature #12084</a>]</p>

<pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">Foo</span>; <span class="ruby-keyword">end</span>

<span class="ruby-constant">Foo</span>.<span class="ruby-identifier">singleton_class</span>.<span class="ruby-identifier">attached_object</span>        <span class="ruby-comment">#=&gt; Foo</span>
<span class="ruby-constant">Foo</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">singleton_class</span>.<span class="ruby-identifier">attached_object</span>    <span class="ruby-comment">#=&gt; #&lt;Foo:0x000000010491a370&gt;</span>
<span class="ruby-constant">Foo</span>.<span class="ruby-identifier">attached_object</span>                        <span class="ruby-comment">#=&gt; TypeError: `Foo&#39; is not a singleton class</span>
<span class="ruby-keyword">nil</span>.<span class="ruby-identifier">singleton_class</span>.<span class="ruby-identifier">attached_object</span>        <span class="ruby-comment">#=&gt; TypeError: `NilClass&#39; is not a singleton class</span>
</pre>
</li></ul>
</li><li>
<p><a href="../Data.html"><code>Data</code></a></p>
<ul><li>
<p>New core class to represent simple immutable value object. The class is  similar to <a href="../Struct.html"><code>Struct</code></a> and partially shares an implementation, but has more  lean and strict API. [<a href="https://bugs.ruby-lang.org/issues/16122">Feature #16122</a>]</p>

<pre class="ruby"><span class="ruby-constant">Measure</span> = <span class="ruby-constant">Data</span>.<span class="ruby-identifier">define</span>(<span class="ruby-value">:amount</span>, <span class="ruby-value">:unit</span>)
<span class="ruby-identifier">distance</span> = <span class="ruby-constant">Measure</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">100</span>, <span class="ruby-string">&#39;km&#39;</span>)            <span class="ruby-comment">#=&gt; #&lt;data Measure amount=100, unit=&quot;km&quot;&gt;</span>
<span class="ruby-identifier">weight</span> = <span class="ruby-constant">Measure</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">amount:</span> <span class="ruby-value">50</span>, <span class="ruby-value">unit:</span> <span class="ruby-string">&#39;kg&#39;</span>) <span class="ruby-comment">#=&gt; #&lt;data Measure amount=50, unit=&quot;kg&quot;&gt;</span>
<span class="ruby-identifier">weight</span>.<span class="ruby-identifier">with</span>(<span class="ruby-value">amount:</span> <span class="ruby-value">40</span>)                      <span class="ruby-comment">#=&gt; #&lt;data Measure amount=40, unit=&quot;kg&quot;&gt;</span>
<span class="ruby-identifier">weight</span>.<span class="ruby-identifier">amount</span>                                <span class="ruby-comment">#=&gt; 50</span>
<span class="ruby-identifier">weight</span>.<span class="ruby-identifier">amount</span> = <span class="ruby-value">40</span>                           <span class="ruby-comment">#=&gt; NoMethodError: undefined method `amount=&#39;</span>
</pre>
</li></ul>
</li><li>
<p><a href="../Encoding.html"><code>Encoding</code></a></p>
<ul><li>
<p>Encoding#replicate has been deprecated and will be removed in 3.3. [<a href="https://bugs.ruby-lang.org/issues/18949">Feature #18949</a>]</p>
</li><li>
<p>The dummy <code>Encoding::UTF_16</code> and <code>Encoding::UTF_32</code> encodings no longer  try to dynamically guess the endian based on a byte order mark.  Use <code>Encoding::UTF_16BE</code>/<code>UTF_16LE</code> and <code>Encoding::UTF_32BE</code>/<code>UTF_32LE</code> instead.  This change speeds up getting the encoding of a <a href="../String.html"><code>String</code></a>. [<a href="https://bugs.ruby-lang.org/issues/18949">Feature #18949</a>]</p>
</li><li>
<p>Limit maximum encoding set size by 256.  If exceeding maximum size, <code>EncodingError</code> will be raised. [<a href="https://bugs.ruby-lang.org/issues/18949">Feature #18949</a>]</p>
</li></ul>
</li><li>
<p><a href="../Enumerator.html"><code>Enumerator</code></a></p>
<ul><li>
<p><a href="../Enumerator.html#method-c-product"><code>Enumerator.product</code></a> has been added. <a href="../Enumerator/Product.html"><code>Enumerator::Product</code></a> is the implementation. [<a href="https://bugs.ruby-lang.org/issues/18685">Feature #18685</a>]</p>
</li></ul>
</li><li>
<p><a href="../Exception.html"><code>Exception</code></a></p>
<ul><li>
<p><a href="../Exception.html#method-i-detailed_message"><code>Exception#detailed_message</code></a> has been added.  The default error printer calls this method on the <a href="../Exception.html"><code>Exception</code></a> object  instead of message. [<a href="https://bugs.ruby-lang.org/issues/18564">Feature #18564</a>]</p>
</li></ul>
</li><li>
<p><a href="../Hash.html"><code>Hash</code></a></p>
<ul><li>
<p><a href="../Hash.html#method-i-shift"><code>Hash#shift</code></a> now always returns nil if the hash is  empty, instead of returning the default value or  calling the default proc. [<a href="https://bugs.ruby-lang.org/issues/16908">Bug #16908</a>]</p>
</li></ul>
</li><li>
<p><a href="../Integer.html"><code>Integer</code></a></p>
<ul><li>
<p><a href="../Integer.html#method-i-ceildiv"><code>Integer#ceildiv</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/18809">Feature #18809</a>]</p>
</li></ul>
</li><li>
<p><a href="../Kernel.html"><code>Kernel</code></a></p>
<ul><li>
<p><a href="../Kernel.html#method-i-binding"><code>Kernel#binding</code></a> raises <a href="../RuntimeError.html"><code>RuntimeError</code></a> if called from a non-Ruby frame  (such as a method defined in C). [<a href="https://bugs.ruby-lang.org/issues/18487">Bug #18487</a>]</p>
</li></ul>
</li><li>
<p><a href="../MatchData.html"><code>MatchData</code></a></p>
<ul><li>
<p><a href="../MatchData.html#method-i-byteoffset"><code>MatchData#byteoffset</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/13110">Feature #13110</a>]</p>
</li><li>
<p><a href="../MatchData.html#method-i-deconstruct"><code>MatchData#deconstruct</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/18821">Feature #18821</a>]</p>
</li><li>
<p><a href="../MatchData.html#method-i-deconstruct_keys"><code>MatchData#deconstruct_keys</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/18821">Feature #18821</a>]</p>
</li></ul>
</li><li>
<p><a href="../Module.html"><code>Module</code></a></p>
<ul><li>
<p><a href="../Module.html#method-c-used_refinements"><code>Module.used_refinements</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/14332">Feature #14332</a>]</p>
</li><li>
<p><a href="../Module.html#method-i-refinements"><code>Module#refinements</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/12737">Feature #12737</a>]</p>
</li><li>
<p><a href="../Module.html#method-i-const_added"><code>Module#const_added</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/17881">Feature #17881</a>]</p>
</li><li>
<p><a href="../Module.html#method-i-undefined_instance_methods"><code>Module#undefined_instance_methods</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/12655">Feature #12655</a>]</p>
</li></ul>
</li><li>
<p><a href="../Proc.html"><code>Proc</code></a></p>
<ul><li>
<p><a href="../Object.html#method-i-dup"><code>Proc#dup</code></a> returns an instance of subclass. [<a href="https://bugs.ruby-lang.org/issues/17545">Bug #17545</a>]</p>
</li><li>
<p><a href="../Proc.html#method-i-parameters"><code>Proc#parameters</code></a> now accepts lambda keyword. [<a href="https://bugs.ruby-lang.org/issues/15357">Feature #15357</a>]</p>
</li></ul>
</li><li>
<p><a href="../Process.html"><code>Process</code></a></p>
<ul><li>
<p>Added <code>RLIMIT_NPTS</code> constant to FreeBSD platform</p>
</li></ul>
</li><li>
<p><a href="../Regexp.html"><code>Regexp</code></a></p>
<ul><li>
<p>The cache-based optimization is introduced.  Many (but not all) <a href="../Regexp.html"><code>Regexp</code></a> matching is now in linear time, which  will prevent regular expression denial of service (ReDoS)  vulnerability. [<a href="https://bugs.ruby-lang.org/issues/19104">Feature #19104</a>]</p>
</li><li>
<p><a href="../Regexp.html#method-c-linear_time-3F"><code>Regexp.linear_time?</code></a> is introduced. [<a href="https://bugs.ruby-lang.org/issues/19194">Feature #19194</a>]</p>
</li><li>
<p><a href="../Regexp.html#method-c-new"><code>Regexp.new</code></a> now supports passing the regexp flags not only as an <a href="../Integer.html"><code>Integer</code></a>,  but also as a <a href="../String.html"><code>String</code></a>. Unknown flags raise <a href="../ArgumentError.html"><code>ArgumentError</code></a>.  Otherwise, anything other than <code>true</code>, <code>false</code>, <code>nil</code> or <a href="../Integer.html"><code>Integer</code></a> will be warned.  [<a href="https://bugs.ruby-lang.org/issues/18788">Feature #18788</a>]</p>
</li><li>
<p><a href="../Regexp.html#method-c-timeout-3D"><code>Regexp.timeout=</code></a> has been added. Also, <a href="../Regexp.html#method-c-new"><code>Regexp.new</code></a> new supports timeout keyword.  See [<a href="https://bugs.ruby-lang.org/issues/17837">Feature #17837</a>]</p>
</li></ul>
</li><li>
<p><a href="../Refinement.html"><code>Refinement</code></a></p>
<ul><li>
<p>Refinement#refined_class has been added. [<a href="https://bugs.ruby-lang.org/issues/12737">Feature #12737</a>]</p>
</li></ul>
</li><li>
<p><a href="../RubyVM/AbstractSyntaxTree.html"><code>RubyVM::AbstractSyntaxTree</code></a></p>
<ul><li>
<p>Add <code>error_tolerant</code> option for <code>parse</code>, <code>parse_file</code> and <code>of</code>. [<a href="https://bugs.ruby-lang.org/issues/19013">Feature #19013</a>]  With this option</p>
<ol><li>
<p><a href="../SyntaxError.html"><code>SyntaxError</code></a> is suppressed</p>
</li><li>
<p>AST is returned for invalid input</p>
</li><li>
<p><code>end</code> is complemented when a parser reaches to the end of input but <code>end</code> is insufficient</p>
</li><li>
<p><code>end</code> is treated as keyword based on indent</p>
</li></ol>

<pre class="ruby"><span class="ruby-comment"># Without error_tolerant option</span>
<span class="ruby-identifier">root</span> = <span class="ruby-constant">RubyVM</span><span class="ruby-operator">::</span><span class="ruby-constant">AbstractSyntaxTree</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">&lt;&lt;~RUBY</span>)
<span class="ruby-value">def m
  a = 10
  if
end
</span><span class="ruby-identifier">RUBY</span>
<span class="ruby-comment"># =&gt; &lt;internal:ast&gt;:33:in `parse&#39;: syntax error, unexpected `end&#39; (SyntaxError)</span>

<span class="ruby-comment"># With error_tolerant option</span>
<span class="ruby-identifier">root</span> = <span class="ruby-constant">RubyVM</span><span class="ruby-operator">::</span><span class="ruby-constant">AbstractSyntaxTree</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">&lt;&lt;~RUBY</span>, <span class="ruby-value">error_tolerant:</span> <span class="ruby-keyword">true</span>)
<span class="ruby-value">def m
  a = 10
  if
end
</span><span class="ruby-identifier">RUBY</span>
<span class="ruby-identifier">p</span> <span class="ruby-identifier">root</span> <span class="ruby-comment"># =&gt; #&lt;RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-4:3&gt;</span>

<span class="ruby-comment"># `end` is treated as keyword based on indent</span>
<span class="ruby-identifier">root</span> = <span class="ruby-constant">RubyVM</span><span class="ruby-operator">::</span><span class="ruby-constant">AbstractSyntaxTree</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">&lt;&lt;~RUBY</span>, <span class="ruby-value">error_tolerant:</span> <span class="ruby-keyword">true</span>)
<span class="ruby-value">module Z
  class Foo
    foo.
  end

  def bar
  end
end
</span><span class="ruby-identifier">RUBY</span>
<span class="ruby-identifier">p</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">children</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">children</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">children</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">children</span>[<span class="ruby-value">-2</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
<span class="ruby-comment"># =&gt; [#&lt;RubyVM::AbstractSyntaxTree::Node:CLASS@2:2-4:5&gt;, #&lt;RubyVM::AbstractSyntaxTree::Node:DEFN@6:2-7:5&gt;]</span>
</pre>
</li><li>
<p>Add <code>keep_tokens</code> option for <code>parse</code>, <code>parse_file</code> and <code>of</code>. Add <code>#tokens</code> and <code>#all_tokens</code>  for <a href="../RubyVM/AbstractSyntaxTree/Node.html"><code>RubyVM::AbstractSyntaxTree::Node</code></a> [<a href="https://bugs.ruby-lang.org/issues/19070">Feature #19070</a>]</p>

<pre class="ruby"><span class="ruby-identifier">root</span> = <span class="ruby-constant">RubyVM</span><span class="ruby-operator">::</span><span class="ruby-constant">AbstractSyntaxTree</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&quot;x = 1 + 2&quot;</span>, <span class="ruby-value">keep_tokens:</span> <span class="ruby-keyword">true</span>)
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">tokens</span> <span class="ruby-comment"># =&gt; [[0, :tIDENTIFIER, &quot;x&quot;, [1, 0, 1, 1]], [1, :tSP, &quot; &quot;, [1, 1, 1, 2]], ...]</span>
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">map</span>{<span class="ruby-identifier">_1</span>[<span class="ruby-value">2</span>]}.<span class="ruby-identifier">join</span> <span class="ruby-comment"># =&gt; &quot;x = 1 + 2&quot;</span>
</pre>
</li></ul>
</li><li>
<p>Set</p>
<ul><li>
<p>Set is now available as a built-in class without the need for <code>require &quot;set&quot;</code>. [<a href="https://bugs.ruby-lang.org/issues/16989">Feature #16989</a>]  It is currently autoloaded via the Set constant or a call to <a href="../Enumerable.html#method-i-to_set"><code>Enumerable#to_set</code></a>.</p>
</li></ul>
</li><li>
<p><a href="../String.html"><code>String</code></a></p>
<ul><li>
<p><a href="../String.html#method-i-byteindex"><code>String#byteindex</code></a> and <a href="../String.html#method-i-byterindex"><code>String#byterindex</code></a> have been added. [<a href="https://bugs.ruby-lang.org/issues/13110">Feature #13110</a>]</p>
</li><li>
<p>Update Unicode to Version 15.0.0 and Emoji Version 15.0. [<a href="https://bugs.ruby-lang.org/issues/18639">Feature #18639</a>]  (also applies to <a href="../Regexp.html"><code>Regexp</code></a>)</p>
</li><li>
<p><a href="../String.html#method-i-bytesplice"><code>String#bytesplice</code></a> has been added. [<a href="https://bugs.ruby-lang.org/issues/18598">Feature #18598</a>]</p>
</li><li>
<p><a href="../String.html#method-i-dedup"><code>String#dedup</code></a> has been added as an alias to <a href="../String.html#method-i-2D-40"><code>String#-@</code></a>. [<a href="https://bugs.ruby-lang.org/issues/18595">Feature #18595</a>]</p>
</li></ul>
</li><li>
<p><a href="../Struct.html"><code>Struct</code></a></p>
<ul><li>
<p>A <a href="../Struct.html"><code>Struct</code></a> class can also be initialized with keyword arguments  without <code>keyword_init: true</code> on <a href="../Struct.html#method-c-new"><code>Struct.new</code></a> [<a href="https://bugs.ruby-lang.org/issues/16806">Feature #16806</a>]</p>

<pre class="ruby"><span class="ruby-constant">Post</span> = <span class="ruby-constant">Struct</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:id</span>, <span class="ruby-value">:name</span>)
<span class="ruby-constant">Post</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">1</span>, <span class="ruby-string">&quot;hello&quot;</span>) <span class="ruby-comment">#=&gt; #&lt;struct Post id=1, name=&quot;hello&quot;&gt;</span>
<span class="ruby-comment"># From Ruby 3.2, the following code also works without keyword_init: true.</span>
<span class="ruby-constant">Post</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">id:</span> <span class="ruby-value">1</span>, <span class="ruby-value">name:</span> <span class="ruby-string">&quot;hello&quot;</span>) <span class="ruby-comment">#=&gt; #&lt;struct Post id=1, name=&quot;hello&quot;&gt;</span>
</pre>
</li></ul>
</li><li>
<p><a href="../Thread.html"><code>Thread</code></a></p>
<ul><li>
<p><a href="../Thread.html#method-c-each_caller_location"><code>Thread.each_caller_location</code></a> is added. [<a href="https://bugs.ruby-lang.org/issues/16663">Feature #16663</a>]</p>
</li></ul>
</li><li>
<p><a href="../Thread/Queue.html"><code>Thread::Queue</code></a></p>
<ul><li>
<p><a href="../Thread/Queue.html#method-i-pop"><code>Thread::Queue#pop</code></a>(timeout: sec) is added. [<a href="https://bugs.ruby-lang.org/issues/18774">Feature #18774</a>]</p>
</li></ul>
</li><li>
<p><a href="../Thread/SizedQueue.html"><code>Thread::SizedQueue</code></a></p>
<ul><li>
<p><a href="../Thread/SizedQueue.html#method-i-pop"><code>Thread::SizedQueue#pop</code></a>(timeout: sec) is added. [<a href="https://bugs.ruby-lang.org/issues/18774">Feature #18774</a>]</p>
</li><li>
<p><a href="../Thread/SizedQueue.html#method-i-push"><code>Thread::SizedQueue#push</code></a>(timeout: sec) is added. [<a href="https://bugs.ruby-lang.org/issues/18944">Feature #18944</a>]</p>
</li></ul>
</li><li>
<p><a href="../Time.html"><code>Time</code></a></p>
<ul><li>
<p><a href="../Time.html#method-i-deconstruct_keys"><code>Time#deconstruct_keys</code></a> is added, allowing to use <a href="../Time.html"><code>Time</code></a> instances  in pattern-matching expressions [<a href="https://bugs.ruby-lang.org/issues/19071">Feature #19071</a>]</p>
</li><li>
<p><a href="../Time.html#method-c-new"><code>Time.new</code></a> now can parse a string like generated by <a href="../Time.html#method-i-inspect"><code>Time#inspect</code></a>  and return a <a href="../Time.html"><code>Time</code></a> instance based on the given argument.  [<a href="https://bugs.ruby-lang.org/issues/18033">Feature #18033</a>]</p>
</li></ul>
</li><li>
<p><a href="../SyntaxError.html"><code>SyntaxError</code></a></p>
<ul><li>
<p>SyntaxError#path has been added. [<a href="https://bugs.ruby-lang.org/issues/19138">Feature #19138</a>]</p>
</li></ul>
</li><li>
<p><a href="../TracePoint.html"><code>TracePoint</code></a></p>
<ul><li>
<p><a href="../TracePoint.html#method-i-binding"><code>TracePoint#binding</code></a> now returns <code>nil</code> for <code>c_call</code>/<code>c_return</code> TracePoints.  [<a href="https://bugs.ruby-lang.org/issues/18487">Bug #18487</a>]</p>
</li><li>
<p><a href="../TracePoint.html#method-i-enable"><code>TracePoint#enable</code></a> <code>target_thread</code> keyword argument now defaults to the  current thread if a block is given and <code>target</code> and <code>target_line</code> keyword  arguments are not passed. [<a href="https://bugs.ruby-lang.org/issues/16889">Bug #16889</a>]</p>
</li></ul>
</li><li>
<p><a href="../UnboundMethod.html"><code>UnboundMethod</code></a></p>
<ul><li>
<p><code>UnboundMethod#==</code> returns <code>true</code> if the actual method is same. For example,  <code>String.instance_method(:object_id) == Array.instance_method(:object_id)</code>  returns <code>true</code>. [<a href="https://bugs.ruby-lang.org/issues/18798">Feature #18798</a>]</p>
</li><li>
<p><code>UnboundMethod#inspect</code> does not show the receiver of <code>instance_method</code>.  For example <code>String.instance_method(:object_id).inspect</code> returns  <code>&quot;#&lt;UnboundMethod: Kernel#object_id()&gt;&quot;</code>  (was <code>&quot;#&lt;UnboundMethod: String(Kernel)#object_id()&gt;&quot;</code>).</p>
</li></ul>
</li><li>
<p><a href="../GC.html"><code>GC</code></a></p>
<ul><li>
<p>Expose <code>need_major_gc</code> via <code>GC.latest_gc_info</code>. <a href="https://github.com/ruby/ruby/pull/6791">GH-6791</a></p>
</li></ul>
</li><li>
<p><a href="../ObjectSpace.html"><code>ObjectSpace</code></a></p>
<ul><li>
<p><code>ObjectSpace.dump_all</code> dump shapes as well. <a href="https://github.com/ruby/ruby/pull/6868">GH-6868</a></p>
</li></ul>
</li></ul>

<h2 id="label-Stdlib+updates">Stdlib updates<span><a href="#label-Stdlib+updates">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Bundler</p>
<ul><li>
<p>Bundler now uses <a href="https://github.com/jhawthorn/pub_grub">PubGrub</a> resolver instead of <a href="https://github.com/CocoaPods/Molinillo">Molinillo</a> for performance improvement.</p>
</li><li>
<p>Add --ext=rust support to bundle gem for creating simple gems with Rust extensions.  [<a href="https://github.com/rubygems/rubygems/pull/6149">GH-rubygems-6149</a>]</p>
</li><li>
<p>Make cloning git repos faster [<a href="https://github.com/rubygems/rubygems/pull/4475">GH-rubygems-4475</a>]</p>
</li></ul>
</li><li>
<p>RubyGems</p>
<ul><li>
<p>Add mswin support for cargo builder. [<a href="https://github.com/rubygems/rubygems/pull/6167">GH-rubygems-6167</a>]</p>
</li></ul>
</li><li>
<p>CGI</p>
<ul><li>
<p><code>CGI.escapeURIComponent</code> and <code>CGI.unescapeURIComponent</code> are added.  [<a href="https://bugs.ruby-lang.org/issues/18822">Feature #18822</a>]</p>
</li></ul>
</li><li>
<p>Coverage</p>
<ul><li>
<p><code>Coverage.setup</code> now accepts <code>eval: true</code>. By this, <code>eval</code> and related methods are  able to generate code coverage. [<a href="https://bugs.ruby-lang.org/issues/19008">Feature #19008</a>]</p>
</li><li>
<p><code>Coverage.supported?(mode)</code> enables detection of what coverage modes are  supported. [<a href="https://bugs.ruby-lang.org/issues/19026">Feature #19026</a>]</p>
</li></ul>
</li><li>
<p>Date</p>
<ul><li>
<p>Added <code>Date#deconstruct_keys</code> and <code>DateTime#deconstruct_keys</code> same as [<a href="https://bugs.ruby-lang.org/issues/19071">Feature #19071</a>]</p>
</li></ul>
</li><li>
<p>ERB</p>
<ul><li>
<p><code>ERB::Util.html_escape</code> is made faster than <code>CGI.escapeHTML</code>.</p>
<ul><li>
<p>It no longer allocates a <a href="../String.html"><code>String</code></a> object when no character needs to be escaped.</p>
</li><li>
<p>It skips calling <code>#to_s</code> method when an argument is already a <a href="../String.html"><code>String</code></a>.</p>
</li><li>
<p><code>ERB::Escape.html_escape</code> is added as an alias to <code>ERB::Util.html_escape</code>,  which has not been monkey-patched by Rails.</p>
</li></ul>
</li><li>
<p><code>ERB::Util.url_encode</code> is made faster using <code>CGI.escapeURIComponent</code>.</p>
</li><li>
<p><code>-S</code> option is removed from <code>erb</code> command.</p>
</li></ul>
</li><li>
<p>FileUtils</p>
<ul><li>
<p>Add FileUtils.ln_sr method and <code>relative:</code> option to FileUtils.ln_s.  [<a href="https://bugs.ruby-lang.org/issues/18925">Feature #18925</a>]</p>
</li></ul>
</li><li>
<p>IRB</p>
<ul><li>
<p>debug.gem integration commands have been added: <code>debug</code>, <code>break</code>, <code>catch</code>,  <code>next</code>, <code>delete</code>, <code>step</code>, <code>continue</code>, <code>finish</code>, <code>backtrace</code>, <code>info</code></p>
<ul><li>
<p>They work even if you don't have <code>gem &quot;debug&quot;</code> in your Gemfile.</p>
</li><li>
<p>See also: <a href="https://st0012.dev/whats-new-in-ruby-3-2-irb">What's new in Ruby 3.2's IRB?</a></p>
</li></ul>
</li><li>
<p>More Pry-like commands and features have been added.</p>
<ul><li>
<p><code>edit</code> and <code>show_cmds</code> (like Pry’s <code>help</code>) are added.</p>
</li><li>
<p><code>ls</code> takes <code>-g</code> or <code>-G</code> option to filter out outputs.</p>
</li><li>
<p><code>show_source</code> is aliased from <code>$</code> and accepts unquoted inputs.</p>
</li><li>
<p><code>whereami</code> is aliased from <code>@</code>.</p>
</li></ul>
</li></ul>
</li><li>
<p>Net::Protocol</p>
<ul><li>
<p>Improve <code>Net::BufferedIO</code> performance. [<a href="https://github.com/ruby/net-protocol/pull/14">GH-net-protocol-14</a>]</p>
</li></ul>
</li><li>
<p>Pathname</p>
<ul><li>
<p>Added <code>Pathname#lutime</code>. [<a href="https://github.com/ruby/pathname/pull/20">GH-pathname-20</a>]</p>
</li></ul>
</li><li>
<p>Socket</p>
<ul><li>
<p>Added the following constants for supported platforms.</p>
<ul><li>
<p><code>SO_INCOMING_CPU</code></p>
</li><li>
<p><code>SO_INCOMING_NAPI_ID</code></p>
</li><li>
<p><code>SO_RTABLE</code></p>
</li><li>
<p><code>SO_SETFIB</code></p>
</li><li>
<p><code>SO_USER_COOKIE</code></p>
</li><li>
<p><code>TCP_KEEPALIVE</code></p>
</li><li>
<p><code>TCP_CONNECTION_INFO</code></p>
</li></ul>
</li></ul>
</li><li>
<p>SyntaxSuggest</p>
<ul><li>
<p>The feature of <code>syntax_suggest</code> formerly <code>dead_end</code> is integrated in Ruby.  [<a href="https://bugs.ruby-lang.org/issues/18159">Feature #18159</a>]</p>
</li></ul>
</li><li>
<p>UNIXSocket</p>
<ul><li>
<p>Add support for UNIXSocket on Windows. Emulate anonymous sockets. Add  support for <a href="../File.html#method-c-socket-3F"><code>File.socket?</code></a> and <a href="../File/Stat.html#method-i-socket-3F"><code>File::Stat#socket?</code></a> where possible.  [<a href="https://bugs.ruby-lang.org/issues/19135">Feature #19135</a>]</p>
</li></ul>
</li><li>
<p>The following default gems are updated.</p>
<ul><li>
<p>RubyGems 3.4.1</p>
</li><li>
<p>abbrev 0.1.1</p>
</li><li>
<p>benchmark 0.2.1</p>
</li><li>
<p>bigdecimal 3.1.3</p>
</li><li>
<p>bundler 2.4.1</p>
</li><li>
<p>cgi 0.3.6</p>
</li><li>
<p>csv 3.2.6</p>
</li><li>
<p>date 3.3.3</p>
</li><li>
<p>delegate 0.3.0</p>
</li><li>
<p>did_you_mean 1.6.3</p>
</li><li>
<p>digest 3.1.1</p>
</li><li>
<p>drb 2.1.1</p>
</li><li>
<p>english 0.7.2</p>
</li><li>
<p>erb 4.0.2</p>
</li><li>
<p>error_highlight 0.5.1</p>
</li><li>
<p>etc 1.4.2</p>
</li><li>
<p>fcntl 1.0.2</p>
</li><li>
<p>fiddle 1.1.1</p>
</li><li>
<p>fileutils 1.7.0</p>
</li><li>
<p>forwardable 1.3.3</p>
</li><li>
<p>getoptlong 0.2.0</p>
</li><li>
<p>io-console 0.6.0</p>
</li><li>
<p>io-nonblock 0.2.0</p>
</li><li>
<p>io-wait 0.3.0</p>
</li><li>
<p>ipaddr 1.2.5</p>
</li><li>
<p>irb 1.6.2</p>
</li><li>
<p>json 2.6.3</p>
</li><li>
<p>logger 1.5.3</p>
</li><li>
<p>mutex_m 0.1.2</p>
</li><li>
<p>net-http 0.3.2</p>
</li><li>
<p>net-protocol 0.2.1</p>
</li><li>
<p>nkf 0.1.2</p>
</li><li>
<p>open-uri 0.3.0</p>
</li><li>
<p>open3 0.1.2</p>
</li><li>
<p>openssl 3.1.0</p>
</li><li>
<p>optparse 0.3.1</p>
</li><li>
<p>ostruct 0.5.5</p>
</li><li>
<p>pathname 0.2.1</p>
</li><li>
<p>pp 0.4.0</p>
</li><li>
<p>pstore 0.1.2</p>
</li><li>
<p>psych 5.0.1</p>
</li><li>
<p>racc 1.6.2</p>
</li><li>
<p>rdoc 6.5.0</p>
</li><li>
<p>readline-ext 0.1.5</p>
</li><li>
<p>reline 0.3.2</p>
</li><li>
<p>resolv 0.2.2</p>
</li><li>
<p>resolv-replace 0.1.1</p>
</li><li>
<p>securerandom 0.2.2</p>
</li><li>
<p>set 1.0.3</p>
</li><li>
<p>stringio 3.0.4</p>
</li><li>
<p>strscan 3.0.5</p>
</li><li>
<p>syntax_suggest 1.0.2</p>
</li><li>
<p>syslog 0.1.1</p>
</li><li>
<p>tempfile 0.1.3</p>
</li><li>
<p>time 0.2.1</p>
</li><li>
<p>timeout 0.3.1</p>
</li><li>
<p>tmpdir 0.1.3</p>
</li><li>
<p>tsort 0.1.1</p>
</li><li>
<p>un 0.2.1</p>
</li><li>
<p>uri 0.12.0</p>
</li><li>
<p>weakref 0.1.2</p>
</li><li>
<p>win32ole 1.8.9</p>
</li><li>
<p>yaml 0.2.1</p>
</li><li>
<p>zlib 3.0.0</p>
</li></ul>
</li><li>
<p>The following bundled gems are updated.</p>
<ul><li>
<p>minitest 5.16.3</p>
</li><li>
<p>power_assert 2.0.3</p>
</li><li>
<p>test-unit 3.5.7</p>
</li><li>
<p>net-ftp 0.2.0</p>
</li><li>
<p>net-imap 0.3.4</p>
</li><li>
<p>net-pop 0.1.2</p>
</li><li>
<p>net-smtp 0.3.3</p>
</li><li>
<p>rbs 2.8.2</p>
</li><li>
<p>typeprof 0.21.3</p>
</li><li>
<p>debug 1.7.1</p>
</li></ul>
</li></ul>

<p>See GitHub releases like <a href="https://github.com/ruby/logger/releases">GitHub Releases of Logger</a> or changelog for details of the default gems or bundled gems.</p>

<h2 id="label-Supported+platforms">Supported platforms<span><a href="#label-Supported+platforms">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>WebAssembly/WASI is added. See <a href="https://github.com/ruby/ruby/blob/master/wasm/README.md">wasm/README.md</a> and <a href="https://github.com/ruby/ruby.wasm">ruby.wasm</a> for more details. [<a href="https://bugs.ruby-lang.org/issues/18462">Feature #18462</a>]</p>
</li></ul>

<h2 id="label-Compatibility+issues">Compatibility issues<span><a href="#label-Compatibility+issues">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p><code>String#to_c</code> currently treat a sequence of underscores as an end of <a href="../Complex.html"><code>Complex</code></a>  string. [<a href="https://bugs.ruby-lang.org/issues/19087">Bug #19087</a>]</p>
</li><li>
<p>Now <code>ENV.clone</code> raises <code>TypeError</code> as well as <code>ENV.dup</code> [<a href="https://bugs.ruby-lang.org/issues/17767">Bug #17767</a>]</p>
</li></ul>

<h3 id="label-Removed+constants">Removed constants<span><a href="#label-Removed+constants">&para;</a> <a href="#top">&uarr;</a></span></h3>

<p>The following deprecated constants are removed.</p>
<ul><li>
<p><code>Fixnum</code> and <code>Bignum</code> [<a href="https://bugs.ruby-lang.org/issues/12005">Feature #12005</a>]</p>
</li><li>
<p><code>Random::DEFAULT</code> [<a href="https://bugs.ruby-lang.org/issues/17351">Feature #17351</a>]</p>
</li><li>
<p><code>Struct::Group</code></p>
</li><li>
<p><code>Struct::Passwd</code></p>
</li></ul>

<h3 id="label-Removed+methods">Removed methods<span><a href="#label-Removed+methods">&para;</a> <a href="#top">&uarr;</a></span></h3>

<p>The following deprecated methods are removed.</p>
<ul><li>
<p><code>Dir.exists?</code> [<a href="https://bugs.ruby-lang.org/issues/17391">Feature #17391</a>]</p>
</li><li>
<p><code>File.exists?</code> [<a href="https://bugs.ruby-lang.org/issues/17391">Feature #17391</a>]</p>
</li><li>
<p><code>Kernel#=~</code> [<a href="https://bugs.ruby-lang.org/issues/15231">Feature #15231</a>]</p>
</li><li>
<p><code>Kernel#taint</code>, <code>Kernel#untaint</code>, <code>Kernel#tainted?</code>  [<a href="https://bugs.ruby-lang.org/issues/16131">Feature #16131</a>]</p>
</li><li>
<p><code>Kernel#trust</code>, <code>Kernel#untrust</code>, <code>Kernel#untrusted?</code>  [<a href="https://bugs.ruby-lang.org/issues/16131">Feature #16131</a>]</p>
</li><li>
<p><code>Method#public?</code>, <code>Method#private?</code>, <code>Method#protected?</code>,  <code>UnboundMethod#public?</code>, <code>UnboundMethod#private?</code>, <code>UnboundMethod#protected?</code>  [<a href="https://bugs.ruby-lang.org/issues/18729">Bug #18729</a>] [<a href="https://bugs.ruby-lang.org/issues/18751">Bug #18751</a>] [<a href="https://bugs.ruby-lang.org/issues/18435">Bug #18435</a>]</p>
</li></ul>

<h3 id="label-Source+code+incompatibility+of+extension+libraries">Source code incompatibility of extension libraries<span><a href="#label-Source+code+incompatibility+of+extension+libraries">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Extension libraries provide PRNG, subclasses of <a href="../Random.html"><code>Random</code></a>, need updates.  See [PRNG update] below for more information. [<a href="https://bugs.ruby-lang.org/issues/19100">Bug #19100</a>]</p>
</li></ul>

<h3 id="label-Error+printer">Error printer<span><a href="#label-Error+printer">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Ruby no longer escapes control characters and backslashes in an  error message. [<a href="https://bugs.ruby-lang.org/issues/18367">Feature #18367</a>]</p>
</li></ul>

<h3 id="label-Constant+lookup+when+defining+a+class-2Fmodule">Constant lookup when defining a class/module<span><a href="#label-Constant+lookup+when+defining+a+class-2Fmodule">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>When defining a class/module directly under the <a href="../Object.html"><code>Object</code></a> class by class/module  statement, if there is already a class/module defined by <code>Module#include</code>  with the same name, the statement was handled as “open class” in Ruby 3.1 or before.  Since Ruby 3.2, a new class is defined instead. [<a href="https://bugs.ruby-lang.org/issues/18832">Feature #18832</a>]</p>
</li></ul>

<h2 id="label-Stdlib+compatibility+issues">Stdlib compatibility issues<span><a href="#label-Stdlib+compatibility+issues">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Psych no longer bundles libyaml sources.  And also Fiddle no longer bundles libffi sources.  Users need to install the libyaml/libffi library themselves via the package  manager like apt, yum, brew, etc.</p>

<p>Psych and fiddle supported the static build with specific version of libyaml and libffi sources. You can build psych with libyaml-0.2.5 like this.</p>

<pre>$ ./configure --with-libyaml-source-dir=/path/to/libyaml-0.2.5</pre>

<p>And you can build fiddle with libffi-3.4.4 like this.</p>

<pre>$ ./configure --with-libffi-source-dir=/path/to/libffi-3.4.4</pre>

<p>[<a href="https://bugs.ruby-lang.org/issues/18571">Feature #18571</a>]</p>
</li><li>
<p>Check cookie name/path/domain characters in <code>CGI::Cookie</code>. [<a href="https://www.ruby-lang.org/en/news/2022/11/22/http-response-splitting-in-cgi-cve-2021-33621/">CVE-2021-33621</a>]</p>
</li><li>
<p><code>URI.parse</code> return empty string in host instead of nil. [<a href="https://hackerone.com/reports/156615">sec-156615</a>]</p>
</li></ul>

<h2 id="label-C+API+updates">C API updates<span><a href="#label-C+API+updates">&para;</a> <a href="#top">&uarr;</a></span></h2>

<h3 id="label-Updated+C+APIs">Updated C APIs<span><a href="#label-Updated+C+APIs">&para;</a> <a href="#top">&uarr;</a></span></h3>

<p>The following APIs are updated.</p>
<ul><li>
<p>PRNG update</p>

<p><code>rb_random_interface_t</code> in ruby/random.h updated and versioned. Extension libraries which use this interface and built for older versions need to rebuild with adding <code>init_int32</code> function.</p>
</li></ul>

<h3 id="label-Added+C+APIs">Added C APIs<span><a href="#label-Added+C+APIs">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p><code>VALUE rb_hash_new_capa(long capa)</code> was added to created hashes with the desired capacity.</p>
</li><li>
<p><code>rb_internal_thread_add_event_hook</code> and <code>rb_internal_thread_add_event_hook</code> were added to instrument threads scheduling.  The following events are available:</p>
<ul><li>
<p><code>RUBY_INTERNAL_THREAD_EVENT_STARTED</code></p>
</li><li>
<p><code>RUBY_INTERNAL_THREAD_EVENT_READY</code></p>
</li><li>
<p><code>RUBY_INTERNAL_THREAD_EVENT_RESUMED</code></p>
</li><li>
<p><code>RUBY_INTERNAL_THREAD_EVENT_SUSPENDED</code></p>
</li><li>
<p><code>RUBY_INTERNAL_THREAD_EVENT_EXITED</code></p>
</li></ul>
</li><li>
<p><code>rb_debug_inspector_current_depth</code> and <code>rb_debug_inspector_frame_depth</code> are added for debuggers.</p>
</li></ul>

<h3 id="label-Removed+C+APIs">Removed C APIs<span><a href="#label-Removed+C+APIs">&para;</a> <a href="#top">&uarr;</a></span></h3>

<p>The following deprecated APIs are removed.</p>
<ul><li>
<p><code>rb_cData</code> variable.</p>
</li><li>
<p>“taintedness” and “trustedness” functions. [<a href="https://bugs.ruby-lang.org/issues/16131">Feature #16131</a>]</p>
</li></ul>

<h2 id="label-Implementation+improvements">Implementation improvements<span><a href="#label-Implementation+improvements">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Fixed several race conditions in <a href="../Kernel.html#method-i-autoload"><code>Kernel#autoload</code></a>. [<a href="https://bugs.ruby-lang.org/issues/18782">Bug #18782</a>]</p>
</li><li>
<p>Cache invalidation for expressions referencing constants is now  more fine-grained. <code>RubyVM.stat(:global_constant_state)</code> was  removed because it was closely tied to the previous caching scheme  where setting any constant invalidates all caches in the system.  New keys, <code>:constant_cache_invalidations</code> and <code>:constant_cache_misses</code>,  were introduced to help with use cases for <code>:global_constant_state</code>.  [<a href="https://bugs.ruby-lang.org/issues/18589">Feature #18589</a>]</p>
</li><li>
<p>The cache-based optimization for <a href="../Regexp.html"><code>Regexp</code></a> matching is introduced.  [<a href="https://bugs.ruby-lang.org/issues/19104">Feature #19104</a>]</p>
</li><li>
<p><a href="https://shopify.engineering/ruby-variable-width-allocation">Variable Width Allocation</a>  is now enabled by default. [<a href="https://bugs.ruby-lang.org/issues/18239#note-17">Feature #18239</a>]</p>
</li><li>
<p>Added a new instance variable caching mechanism, called object shapes, which  improves inline cache hits for most objects and allows us to generate very  efficient JIT code. Objects whose instance variables are defined in a  consistent order will see the most performance benefits.  [<a href="https://bugs.ruby-lang.org/issues/18776">Feature #18776</a>]</p>
</li><li>
<p>Speed up marking instruction sequences by using a bitmap to find “markable”  objects. This change results in faster major collections.  [<a href="https://bugs.ruby-lang.org/issues/18875">Feature #18875</a>]</p>
</li></ul>

<h2 id="label-JIT">JIT<span><a href="#label-JIT">&para;</a> <a href="#top">&uarr;</a></span></h2>

<h3 id="label-YJIT">YJIT<span><a href="#label-YJIT">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>YJIT is no longer experimental</p>
<ul><li>
<p>Has been tested on production workloads for over a year and proven to be quite stable.</p>
</li></ul>
</li><li>
<p>YJIT now supports both x86-64 and arm64/aarch64 CPUs on Linux, MacOS, BSD and other UNIX platforms.</p>
<ul><li>
<p>This release brings support for Mac M1/M2, AWS Graviton and Raspberry Pi 4.</p>
</li></ul>
</li><li>
<p>Building YJIT now requires Rust 1.58.0+. [<a href="https://bugs.ruby-lang.org/issues/18481">Feature #18481</a>]</p>
<ul><li>
<p>In order to ensure that CRuby is built with YJIT, please install <code>rustc</code> &gt;= 1.58.0  before running <code>./configure</code></p>
</li><li>
<p>Please reach out to the YJIT team should you run into any issues.</p>
</li></ul>
</li><li>
<p>Physical memory for JIT code is lazily allocated. Unlike Ruby 3.1,  the RSS of a Ruby process is minimized because virtual memory pages  allocated by <code>--yjit-exec-mem-size</code> will not be mapped to physical  memory pages until actually utilized by JIT code.</p>
</li><li>
<p>Introduce Code <a href="../GC.html"><code>GC</code></a> that frees all code pages when the memory consumption  by JIT code reaches <code>--yjit-exec-mem-size</code>.</p>
<ul><li>
<p><code>RubyVM::YJIT.runtime_stats</code> returns Code <a href="../GC.html"><code>GC</code></a> metrics in addition to  existing <code>inline_code_size</code> and <code>outlined_code_size</code> keys:  <code>code_gc_count</code>, <code>live_page_count</code>, <code>freed_page_count</code>, and <code>freed_code_size</code>.</p>
</li></ul>
</li><li>
<p>Most of the statistics produced by <code>RubyVM::YJIT.runtime_stats</code> are now available in release builds.</p>
<ul><li>
<p>Simply run ruby with <code>--yjit-stats</code> to compute and dump stats (incurs some run-time overhead).</p>
</li></ul>
</li><li>
<p>YJIT is now optimized to take advantage of object shapes. [<a href="https://bugs.ruby-lang.org/issues/18776">Feature #18776</a>]</p>
</li><li>
<p>Take advantage of finer-grained constant invalidation to invalidate less code when defining new constants. [<a href="https://bugs.ruby-lang.org/issues/18589">Feature #18589</a>]</p>
</li><li>
<p>The default <code>--yjit-exec-mem-size</code> is changed to 64 (MiB).</p>
</li><li>
<p>The default <code>--yjit-call-threshold</code> is changed to 30.</p>
</li></ul>

<h3 id="label-MJIT">MJIT<span><a href="#label-MJIT">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>The MJIT compiler is re-implemented in Ruby as <code>ruby_vm/mjit/compiler</code>.</p>
</li><li>
<p>MJIT compiler is executed under a forked Ruby process instead of  doing it in a native thread called MJIT worker. [<a href="https://bugs.ruby-lang.org/issues/18968">Feature #18968</a>]</p>
<ul><li>
<p>As a result, Microsoft Visual Studio (MSWIN) is no longer supported.</p>
</li></ul>
</li><li>
<p>MinGW is no longer supported. [<a href="https://bugs.ruby-lang.org/issues/18824">Feature #18824</a>]</p>
</li><li>
<p>Rename <code>--mjit-min-calls</code> to <code>--mjit-call-threshold</code>.</p>
</li><li>
<p>Change default <code>--mjit-max-cache</code> back from 10000 to 100.</p>
</li></ul>

</main>

</div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

